package com.gmrz.uap.tenant;

import com.gmrz.uap.model.Tenant;
import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;

import java.util.List;

public class TenantAllInterceptor implements Interceptor {

    public void intercept(Invocation inv) {
        List<Tenant> tenants = TenantService.me.getAllTenants();
        inv.getController().setAttr("tenants", tenants);
        inv.invoke();
    }
}
